var Ueditor = require('../lib/mongo').Ueditor;
module.exports = {
    addUeditor: function addUeditor(data) {
        return Ueditor.create(data).exec();
    },
    updateUeditor: function updateUeditor(id, data) {
        return Ueditor.update({goodsId: id}, {$set: data}).exec()
    },
    deleUeditor: function deleUeditor(id) {
        return Ueditor.remove({goodsId: id}).exec();
    },
    getUeditor: function getUeditor(id){
        return Ueditor.find({goodsId: id}).exec();
    },
    getAllUeditor: function getAllUeditor(){
        return Ueditor.find().exec();
    }
};